clear all

** Set working directory: please set your own
/*
cd "~/Dropbox/sanctions_replication/"
*/
** Open dataset
use data/survey_clean.dta, clear

** Run the analyses
* Physical sanctions, attitudes and emotions
regr intent_phis_vox_num  left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num pca_all_up, r
est store vox_phis_attitudes_party1

regr intent_phis_vox_num  left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num pca_all_psoe, r
est store vox_phis_attitudes_party2

* Verbal sanctions, attitudes and emotions
regr intent_verb_vox_num  left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num pca_all_up, r
est store vox_verbal_attitudes_party1

regr intent_verb_vox_num   left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num pca_all_psoe, r
est store vox_verbal_attitudes_party2

* Insult, attitudes and emotions
regr intent_insult_vox_num   left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num pca_all_up, r
est store vox_insult_attitudes_party1

regr intent_insult_vox_num   left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num pca_all_psoe, r
est store vox_insult_attitudes_party2

* PCA direct sanctions, attitudes and emotions
regr pca_direct  left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num pca_all_up, r
est store pca_direct_attitudes_party1

regr pca_direct  left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num pca_all_psoe, r
est store pca_direct_attitudes_party2

* Deny help, attitudes and emotions
regr intent_deny_vox_num   left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num pca_all_up, r
est store vox_deny_attitudes_party1

regr intent_deny_vox_num   left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num pca_all_psoe, r
est store vox_deny_attitudes_party2

* Avoid Interaction, attitudes and emotions
regr intent_avoid_vox_num  left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num pca_all_up, r
est store vox_avoid_attitudes_party1

regr intent_avoid_vox_num  left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num pca_all_psoe, r
est store vox_avoid_attitudes_party2

* Gossip, attitudes and emotions
regr intent_gossip_vox_num  left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num pca_all_up, r
est store vox_gossip_attitudes_party1

regr intent_gossip_vox_num  left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num pca_all_psoe, r
est store vox_gossip_attitudes_party2

* PCA indirect sanctions, attitudes and emotions
regr pca_indirect  left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num pca_all_up, r
est store pca_ind_attitudes_party1

regr pca_indirect  left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num pca_all_psoe, r
est store pca_ind_attitudes_party2

* PCA all sanctions, attitudes and emotions
regr pca_all  left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num pca_all_up, r
est store pca_all_attitudes_party1

regr pca_all  left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num pca_all_psoe, r
est store pca_all_attitudes_party2

* Make table
esttab vox_phis_attitudes_party1 vox_phis_attitudes_party2 vox_verbal_attitudes_party1 vox_verbal_attitudes_party2 vox_insult_attitudes_party1 vox_insult_attitudes_party2 pca_direct_attitudes_party1 pca_direct_attitudes_party2 vox_gossip_attitudes_party1 vox_gossip_attitudes_party2 ///
 vox_deny_attitudes_party1 vox_deny_attitudes_party2 vox_avoid_attitudes_party1 vox_avoid_attitudes_party2 pca_ind_attitudes_party1 pca_ind_attitudes_party2 pca_all_attitudes_party1 pca_all_attitudes_party2  ///
using tables/tableb16.tex, tex nonumber ///
mtitles("Physical" "Physical" "Verbal" "Verbal" "Insult" "Insult"  "Dir sanct (PCA)" "Dir sanct (PCA)" "Gossip" "Gossip" "Deny help" "Deny help" "Avoid interact" "Avoid interact" "Ind sanct (PCA)" "Ind sanct (PCA)" "All sanctions (PCA)" "All sanctions (PCA)" ) ///
coeflabels(left_right_self "Left-right self placement" vox_vote_ccaa "Vox vote in Region" ///
female_dummy "Female (dummy)" age_calculated "Age" college "College" spanish "Spanish" ///
pol_interest "Political interest" happy_vox_num "Happiness" ///
anger_vox_num "Anger" disgust_vox_num "Disgust" fear_vox_num "Fear" sad_vox_num "Sadness" _cons "Constant" ///
intent_phis_up_num "Willigness to impose physical sanctions UP" intent_phis_psoe_num "Willigness to impose physical sanctions PSOE" ///
intent_verb_up_num "Willigness to impose verbal sanctions UP" intent_verb_psoe_num "Willigness to impose verbal sanctions PSOE" ///
intent_insult_up_num "Willigness to insult UP" intent_insult_psoe_num "Willigness to insult PSOE" ///
pca_direct_up "PCA direct sanctions UP" pca_direct_psoe "PCA direct sanctions PSOE" ///
intent_deny_up_num "Willigness to deny help UP" intent_deny_psoe_num "Willigness to impose physical sanctions on PSOE" ///
intent_avoid_up_num "Willigness to avoid interaction UP" intent_avoid_psoe_num "Willigness to avoid interaction PSOE" ///
intent_gossip_up_num "Willigness to gossip UP" intent_gossip_psoe_num "Willigness to gossip PSOE" ///
pca_indirect_up "PCA indirect sanctions UP" pca_indirect_psoe "PCA indirect sanctions PSOE" ///
pca_all_up "PCA all sanctions UP" pca_all_psoe "PCA all sanctions PSOE" ///
_cons "Constant") se ///
replace addnotes("Standard errors are robust")



